home *** CD-ROM | disk | FTP | other *** search
- # This is a general purpose BBS auto-dial. Edit modem codes, login, and setup
- # files for your purposes. Remember...macro must not exceed 4k, speed of code
- # transmission is determined by transfer rate in ASCII transfer menu.
- # Control-C can abort between commands.
- me('Loading Uniterm set up File') w(10)
- loadsetup('uniterm.set') w(10)
- # Following are modem codes:
- se('atz\r\n') w(10) se('ats7=17\r\n') w(10) se('atx4\r\n')
- # This macro will redial w/prompt for retry number.
- me('Dialing BBS. Will re-dial w/prompt for retries') w(10)
- se('atdt \r\n') w(05) set(1,1) set(2,0)
- # Following is looking for first message from online to respond to.
- if(!get('CONNECT',21)) ju(1)
- :7
- # Put log-on codes here. Put prompt text in "get", response in "send".
- ge(' ',10) w(05) se(' ')
- ge(' ',10) me(' ') w(05) se(' ')
- ge('Enter ID Number',15) w(20) se(' \r\n')
- ge('Enter Your Password:',15) w(05) se(' \r\n')
- #Start history and exit.
- history(1) me('History recording is ON') w(20) exit(0)
- :1
- # 1st fail and re-dial message.
- ec('\r\n') ec('Failed!\r\n') w(05)
- if(!input('Retries? Enter #1-?+Ret. or Cancel')) ec('Quit!\n') exit(0)
- # Check to see if $T is "0". Yes=quit, No=go on.
- if(com($T,'0')) ec('Quit. FINISHED!\r\n') exit(0)
- # Use # in $T to set re-try counter.
- set(1,.$T)
- # place number in "Wait" command 3 seconds less than re-dial timeout.
- me('Re-dial in 30 seconds.') w(270)
- :2
- # Re-dial count, display, and check follows: @1= retry countdown @2=retry#
- # "$T"=current retry display count.
- # Display total remaining user re-tries on next line:
- ec("@1) ec(' re-dial remains:\r\n') w(05)
- set(1,add(@1,-1)) set(2,add(@2,1)) con('RETRY# ',"@2') ec($T) ec('\r\n')
- me('Re-dialing Cave Creek BBS. Cntrl-C aborts. NOW!') w(30)
- me('Dialing...') send('atdt \r\n')
- # Timeout for re-dial and success/fail. "ju(4)"=fail
- if(!ge('CONNECT',21)) ec('\r\n') ju(4)
- # If success, will return to log-in code near beginning.
- ju(7)
- :4
- # Look for count in @1 for "0". If not, re-dial.
- # If so, prompt for more retries.
- if(com("@1','0')) ca(5)
- # Failed and redial message for all until last prompt.
- ec('Failed!\r\n') w(10) se('\n') me('Re-dial in 30 sec.') w(270) ju(2)
- :5
- # Prompt to try again or stop and end macro.
- ec('Failed! More retries?\r\n') w(05) se('\n')
- # User clicks "OK" will loop re-dial routine.
- # Prompt for re-try #. "set" for variable int. @1 to # entered by user.
- # If "cancel is clicked, message, and end.
- if(input('Retries failed. Try again? Enter #-RET.')) ju(6)
- ec('ALL RETRIES FAILED! FINISHED.\r\n') w(10) exit(0)
- :6
- # Check to see if $T is "0". Yes=quit, No=go on.
- if(com($T,'0')) ec('Quit. FINISHED!\r\n') exit(0)
- # Make "set" for variable "@1" user number.
- w(05) set(1,.$T) ju(2)
-